package com.demo.shoppingcart.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 购物车Bean
 * @author liangliang
 * Preferences -> Inspections -> Serialization issues -> Serialization class without 'serialVersionUID' 打上勾
 */
public class ShoppingCart implements Serializable {

    private static final long serialVersionUID = -685305991559681877L;

    // 商品结果集
    private List<ShoppingItem> items = new ArrayList<>();

    // 添加购物项到购物车
    public void addItem(ShoppingItem item){
        // 判断是否包含同款
        if(items.contains(item)){
            
        }
    }
}
